﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DependencyObjectTreeViewer
{
    [Serializable]
    public class DependencyObjectData
    {
        #region DependencyObjectTreeNode

        [Serializable]
        public class DependencyObjectTreeNode
        {
            #region Private Property Backers

            private List<DependencyObjectTreeNode> _Children = new List<DependencyObjectTreeNode>();
            private string _NodeType;

            #endregion

            #region Constructors

            public DependencyObjectTreeNode(string nodeType)
            {
                _NodeType = nodeType;
            }

            public DependencyObjectTreeNode()
            {
            }

            #endregion

            #region Properties

            public List<DependencyObjectTreeNode> Children
            {
                get
                {
                    return _Children;
                }
                set
                {
                    _Children = value;
                }
            }

            public string NodeType
            {
                get
                {
                    return _NodeType;
                }
                set
                {
                    _NodeType = value;
                }
            }

            #endregion
        }

        #endregion

        #region Private Property Backers

        private DependencyObjectTreeNode _LogicalTree, _VisualTree;

        #endregion

        #region Properties

        public DependencyObjectTreeNode LogicalTree
        {
            get
            {
                return _LogicalTree;
            }
            set
            {
                _LogicalTree = value;
            }
        }

        public DependencyObjectTreeNode VisualTree
        {
            get
            {
                return _VisualTree;
            }
            set
            {
                _VisualTree = value;
            }
        }

        #endregion

        #region Constructors

        public DependencyObjectData()
        {
        }

        public DependencyObjectData(DependencyObjectTreeNode logicalTree, DependencyObjectTreeNode visualTree)
        {
            _LogicalTree = logicalTree;
            _VisualTree = visualTree;
        }

        #endregion
    }
}